import request from '@/config/axios'

//获取列表
export const getFingerPage = (params) => {
  return request.getOriginal({
    url: '/amp/feature-finger-new/page',
    params
  })
}

// 查询详情
export const getFinger = (id: number) => {
  return request.get({ url: '/amp/feature-finger-new/get?id=' + id })
}

// 新增
export const createFinger = (data) => {
  return request.upload({ url: '/amp/feature-finger-new/create-with-file', data: data })
}

// 修改
export const updateFinger = (params) => {
  return request.put({ url: '/amp/feature-finger-new/update', data: params })
}

// 删除
export const deleteFinger = (id: number) => {
  return request.delete({ url: '/amp/feature-finger-new/delete?id=' + id })
}
// 批量删除
export const deleteFingerList = (data) => {
  return request.delete({ url: '/amp/feature-finger-new/deleteAll', data })
}

//获取指纹类型
export const getFingerType = () => {
  return request.get({ url: '/amp/feature-finger/finger-type' })
}

//导出excel
export const fingerExportExcelFile = async (params) => {
  return await request.download({
    url: '/amp/feature-finger-new/export-excel',
    params
  })
}

//导入
export const fingerImportFile = async (data) => {
  return await request.upload({
    url: '/amp/feature-finger-new/upload-finger',
    data
  })
}

// 指纹管理中文件导入查询文件信息
export const getInfoFileManage = (data) => {
  return request.post({ url: '/amp/feature-finger-new/getIntoFileManage', data })
}

// 指纹管理保存引入文件
export const intoFileManage = (data) => {
  return request.put({ url: '/amp/feature-finger-new/intoFileManage', data })
}

// 指纹管理获取同步列表
export const getSyncList = () => {
  return request.get({ url: 'amp/feature-finger-new/getAssetPassTemp' })
}

// 指纹管理保存引入文件
export const saveSync = (data) => {
  return request.put({ url: '/amp/feature-finger-new/savePassTempByIds', data })
}
